Skip to content

chore: [#969] Add strict clippy lints#970

Open
milkyskies wants to merge 3 commits intomainfrom
chore/969.strict-clippy
Open

chore: [#969] Add strict clippy lints#970
milkyskies wants to merge 3 commits intomainfrom
chore/969.strict-clippy

Conversation

@milkyskies
Copy link
Copy Markdown
Collaborator

closes #969

Summary

Adds a [lints.clippy] section to Cargo.toml with strict rules:

Deny (breaks CI):

  • collapsible_if, collapsible_else_if - no nested ifs that can be collapsed
  • needless_bool, needless_return - clean returns
  • redundant_else, manual_let_else - use let-else pattern
  • unnested_or_patterns, single_match_else - cleaner patterns
  • fn_params_excessive_bools, struct_excessive_bools - no boolean spaghetti

Warn (flags for refactoring):

  • cognitive_complexity - flags functions over complexity 25 (14 currently)
  • too_many_lines - flags functions over 100 lines (37 currently)
  • match_same_arms - flags duplicate match arms (33 currently)

Auto-fixed 11 violations. 97 warnings remain as refactoring targets.

Test plan

  • All 1291 tests pass
  • Zero clippy errors (deny lints clean)

🤖 Generated with Claude Code

Deny: collapsible_if, needless_bool, needless_return, redundant_else,
manual_let_else, unnested_or_patterns, single_match_else,
fn_params_excessive_bools, struct_excessive_bools

Warn: cognitive_complexity, too_many_lines, match_same_arms

Auto-fixed 11 violations (let-else, or-patterns, single-match).
97 warnings remain for future refactoring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the chore label Apr 3, 2026
milkyskies and others added 2 commits April 3, 2026 11:27
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
wildcard_imports, uninlined_format_args, unused_self,
needless_pass_by_value, redundant_closure, manual_string_new,
needless_continue, cast_lossless, explicit_iter_loop,
unnecessary_wraps, match_wildcard_for_single_variants

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add strict clippy lints and fix violations

1 participant